// pages/mine/mine.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    userInfo: null
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  getUserInfo () {
    this.data.userInfo
    ?
    ''
    :
    wx.getUserProfile({
      desc: '获取用户信息', // 声明获取用户个人信息后的用途，后续会展示在弹窗中，请谨慎填写
      success: (res) => {
        console.log(res.userInfo)
        this.setData({
          userInfo: res.userInfo
        });
      }
    });
  },

  toMiniCodePage () {
    wx.navigateTo({
      url: '/pages/mini-code/mini-code',
      fail: ()=>{},
      complete: ()=>{}
    });
  },

  toSoftDocumentPage () {
    wx.navigateTo({
      url: '/pages/soft-document/document',
      fail: ()=>{},
      complete: ()=>{}
    });
  },

  toTagsPage () {
    wx.navigateTo({
      url: '/pages/tags/tags',
      fail: ()=>{},
      complete: ()=>{}
    });
  },

  toStatiticsPage () {
    wx.navigateTo({
      url: '/pages/statistics/statistics',
      fail: ()=>{},
      complete: ()=>{}
    });
  },

  toSettingPage () {
    wx.navigateTo({
      url: '/pages/setting/setting',
      fail: ()=>{},
      complete: ()=>{}
    });
  },

  toFeedbackPage () {
    wx.navigateTo({
      url: '/pages/feedback/feedback',
      fail: ()=>{},
      complete: ()=>{}
    });
  }
})